package com.bjsxt.service.impl;

import com.bjsxt.mapper.PlannerMapper;
import com.bjsxt.pojo.PageA;
import com.bjsxt.pojo.Planner;
import com.bjsxt.service.PlannerService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PlannerServiceImpl implements PlannerService {
    @Autowired
    private PlannerMapper plannerMapper;
    //策划师的查询
    @Override
    public PageA<Planner> findMore(Integer page, Integer rows,Integer cid) {
        Page pg = PageHelper.startPage(page, rows);
        List<Planner> list = plannerMapper.selectMore(cid);
        PageA<Planner> pga=new PageA<>(list,pg.getTotal());
        return pga;
    }
}
